package effizienz;

public class Potenz{
  public static void main(String[] args){
    double b=Double.parseDouble(args[0]);
    int n=Integer.parseInt(args[1]);
    System.out.println(potenz(b, n));
  }

  public static double potenz(double b, int n){
    if(n==0) return 1;
    if(n%2==1) return b*potenz(b, n-1);
    b=potenz(b, n/2);
    return b*b;
  }
}
